Skip to content

api: IBA::make_texture now honors "maketx:threads" hint#5014

Merged
lgritz merged 2 commits into
AcademySoftwareFoundation:mainfrom
lgritz:lg-mktexthread
Jan 28, 2026
Merged

api: IBA::make_texture now honors "maketx:threads" hint#5014
lgritz merged 2 commits into
AcademySoftwareFoundation:mainfrom
lgritz:lg-mktexthread

Conversation

@lgritz
Copy link
Copy Markdown
Collaborator

@lgritz lgritz commented Jan 26, 2026

Nearly all IBA functions take an optional parameter controlling the threading. But make_texture() did not, so there was no way to control its thread usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes make_texture honor any "maketx:threads" hint passed in the config ImageSpec that it already takes to convey all sorts of controls over the texture creation process. Then this value is passed to any IBA functions, use of parallel_image, and anything else in the implementation of make_texture that would end up using the thread pool.

Fixes #4254

Nearly all IBA functions take an optional nthreads parameter. But
make_texture() did not, so there was no way to control its thread
usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes
make_texture honor any "maketx:threads" hint passed in the config
ImageSpec. Then this value is passed to the IBA functions, use of
parallel_image, and anything else in the implementation of
make_texture that would end up using the thread pool.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Comment thread src/libOpenImageIO/maketexture.cpp Outdated
Comment thread src/libOpenImageIO/maketexture.cpp
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Copy link
Copy Markdown
Contributor

@jessey-git jessey-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks alright to me now. Watch out for the clang-format error though.

@lgritz lgritz merged commit bdb4208 into AcademySoftwareFoundation:main Jan 28, 2026
29 of 30 checks passed
@lgritz lgritz deleted the lg-mktexthread branch January 28, 2026 22:10
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Jan 30, 2026
…areFoundation#5014)

Nearly all IBA functions take an optional parameter controlling the
threading. But make_texture() did not, so there was no way to control
its thread usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes
make_texture honor any "maketx:threads" hint passed in the config
ImageSpec that it already takes to convey all sorts of controls over the
texture creation process. Then this value is passed to any IBA
functions, use of parallel_image, and anything else in the
implementation of make_texture that would end up using the thread pool.

Fixes AcademySoftwareFoundation#4254

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
ssh4net pushed a commit to ssh4net/OpenImageIO that referenced this pull request Feb 24, 2026
…areFoundation#5014)

Nearly all IBA functions take an optional parameter controlling the
threading. But make_texture() did not, so there was no way to control
its thread usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes
make_texture honor any "maketx:threads" hint passed in the config
ImageSpec that it already takes to convey all sorts of controls over the
texture creation process. Then this value is passed to any IBA
functions, use of parallel_image, and anything else in the
implementation of make_texture that would end up using the thread pool.

Fixes AcademySoftwareFoundation#4254

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com>
ssh4net pushed a commit to ssh4net/OpenImageIO that referenced this pull request Apr 1, 2026
…areFoundation#5014)

Nearly all IBA functions take an optional parameter controlling the
threading. But make_texture() did not, so there was no way to control
its thread usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes
make_texture honor any "maketx:threads" hint passed in the config
ImageSpec that it already takes to convey all sorts of controls over the
texture creation process. Then this value is passed to any IBA
functions, use of parallel_image, and anything else in the
implementation of make_texture that would end up using the thread pool.

Fixes AcademySoftwareFoundation#4254

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Vlad <shaamaan@gmail.com>
ssh4net pushed a commit to ssh4net/OpenImageIO that referenced this pull request Apr 2, 2026
…areFoundation#5014)

Nearly all IBA functions take an optional parameter controlling the
threading. But make_texture() did not, so there was no way to control
its thread usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes
make_texture honor any "maketx:threads" hint passed in the config
ImageSpec that it already takes to convey all sorts of controls over the
texture creation process. Then this value is passed to any IBA
functions, use of parallel_image, and anything else in the
implementation of make_texture that would end up using the thread pool.

Fixes AcademySoftwareFoundation#4254

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com>
ssh4net pushed a commit to ssh4net/OpenImageIO that referenced this pull request Apr 2, 2026
…areFoundation#5014)

Nearly all IBA functions take an optional parameter controlling the
threading. But make_texture() did not, so there was no way to control
its thread usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes
make_texture honor any "maketx:threads" hint passed in the config
ImageSpec that it already takes to convey all sorts of controls over the
texture creation process. Then this value is passed to any IBA
functions, use of parallel_image, and anything else in the
implementation of make_texture that would end up using the thread pool.

Fixes AcademySoftwareFoundation#4254

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com>
ssh4net pushed a commit to ssh4net/OpenImageIO that referenced this pull request Apr 2, 2026
…areFoundation#5014)

Nearly all IBA functions take an optional parameter controlling the
threading. But make_texture() did not, so there was no way to control
its thread usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes
make_texture honor any "maketx:threads" hint passed in the config
ImageSpec that it already takes to convey all sorts of controls over the
texture creation process. Then this value is passed to any IBA
functions, use of parallel_image, and anything else in the
implementation of make_texture that would end up using the thread pool.

Fixes AcademySoftwareFoundation#4254

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com>
Signed-off-by: Vlad <shaamaan@gmail.com>
ssh4net pushed a commit to ssh4net/OpenImageIO that referenced this pull request Apr 2, 2026
…areFoundation#5014)

Nearly all IBA functions take an optional parameter controlling the
threading. But make_texture() did not, so there was no way to control
its thread usage (it would always use the default number of threads).

Without changing the call signature or ABI, this patch merely makes
make_texture honor any "maketx:threads" hint passed in the config
ImageSpec that it already takes to convey all sorts of controls over the
texture creation process. Then this value is passed to any IBA
functions, use of parallel_image, and anything else in the
implementation of make_texture that would end up using the thread pool.

Fixes AcademySoftwareFoundation#4254

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com>
Signed-off-by: Vlad <shaamaan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] OIIO::ImageBufAlgo::make_texture doesn't take an nthreads argument

2 participants